package jpa.entitys.promis.common;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the PAYMENT_VOUCHERS database table.
 * 
 */
@Entity
@Table(name="PAYMENT_VOUCHERS")
@NamedQueries({
    @NamedQuery(name = "PaymentVoucher.findAll", query = " SELECT c FROM PaymentVoucher c "),
    @NamedQuery(name = "PaymentVoucher.findById", query = " SELECT c FROM PaymentVoucher c WHERE c.id = :Id "),
    @NamedQuery(name = "PaymentVoucher.findByStatus", query = " SELECT c FROM PaymentVoucher c WHERE c.syncIssync = 'N'"),
})
public class PaymentVoucher extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private PaymentVoucherPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ADVANCE_ADJUSTED_AMOUNT_FC", precision=16, scale=2)
	private BigDecimal advanceAdjustedAmountFc;

	@Column(name="ADVANCE_ADJUSTED_AMOUNT_LOCAL", precision=16, scale=2)
	private BigDecimal advanceAdjustedAmountLocal;

	@Column(name="ADVANCE_ADJUSTED_VAT", precision=16)
	private BigDecimal advanceAdjustedVat;

	@Column(name="ADVANCE_ADJUSTMENT", precision=16, scale=2)
	private BigDecimal advanceAdjustment;

	@Column(precision=16, scale=2)
	private BigDecimal amount;

	@Column(name="AMOUNT_ADJUSTED", precision=16, scale=2)
	private BigDecimal amountAdjusted;

	@Column(name="AMOUNT_ADJUSTED_LOCAL", precision=16, scale=2)
	private BigDecimal amountAdjustedLocal;

	@Column(name="AMOUNT_LOCAL", precision=16, scale=2)
	private BigDecimal amountLocal;

	@Column(name="APPROVAL_STATUS", length=1)
	private String approvalStatus;

	@Column(name="APPROVED_BY", length=8)
	private String approvedBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="APPROVED_ON_DATE")
	private Date approvedOnDate;

	@Column(name="BATCH_ID")
	private String batchId;

	@Column(name="BOB_CODE", length=30)
	private String bobCode;

	@Column(name="BOT_CODE", length=30)
	private String botCode;

	@Column(name="CHEQUE_AMOUNT", precision=22)
	private BigDecimal chequeAmount;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(length=3)
	private String currency;

	@Column(name="DEPARTMENT_CODE", length=30)
	private String departmentCode;

	@Column(name="DOCUMENT_REF", length=30)
	private String documentRef;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="DOCUMENT_REF_DATE")
	private Date documentRefDate;

	@Column(name="DOWN_ADJUSTED", precision=22)
	private BigDecimal downAdjusted;

	@Column(name="DOWN_ADJUSTED_LOCAL", precision=22)
	private BigDecimal downAdjustedLocal;

	@Column(name="EMPLOYEE_CODE", length=30)
	private String employeeCode;

	@Column(name="EXCH_GAIN_LOSS", precision=16, scale=2)
	private BigDecimal exchGainLoss;

	@Column(name="EXCHANGE_RATE", precision=12, scale=8)
	private BigDecimal exchangeRate;

	@Column(name="FISCAL_PERIOD", precision=2)
	private BigDecimal fiscalPeriod;

	@Column(name="FISCAL_YEAR", precision=4)
	private BigDecimal fiscalYear;

	@Column(name="GD_AMOUNT_DEDUCTED", precision=22)
	private BigDecimal gdAmountDeducted;

	@Column(name="GD_AMOUNT_DEDUCTED_LC", precision=22)
	private BigDecimal gdAmountDeductedLc;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LINK_FILE_ID", precision=22)
	private BigDecimal linkFileId;

	@Column(name="MODE_OF_PAYMENT", length=1)
	private String modeOfPayment;

	@Column(length=2000)
	private String narration;

	@Column(name="OTHER_DEDUCT_AMOUNT_INST", precision=22)
	private BigDecimal otherDeductAmountInst;

	@Column(name="OTHER_DEDUCTED_AMOUNT", precision=16, scale=2)
	private BigDecimal otherDeductedAmount;

	@Column(name="PENALTY_AMOUNT", precision=22)
	private BigDecimal penaltyAmount;

	@Column(name="PENALTY_AMOUNT_LC", precision=22)
	private BigDecimal penaltyAmountLc;

	@Column(name="PO_NO", precision=6)
	private BigDecimal poNo;

	@Column(name="PO_SERIES", length=4)
	private String poSeries;

	@Column(name="PO_TYPE", length=2)
	private String poType;

	@Column(name="POSTING_STATUS", length=1)
	private String postingStatus;

	@Column(name="PREPARED_BY", length=50)
	private String preparedBy;

	@Column(length=30)
	private String project;

	@Column(name="PROPERTY_TYPE_CODE", length=30)
	private String propertyTypeCode;

	@Column(name="REF_AP", length=30)
	private String refAp;

	@Column(name="REF_CONTR_NO", precision=22)
	private BigDecimal refContrNo;

	@Column(name="REF_CONTR_REVISION", precision=22)
	private BigDecimal refContrRevision;

	@Column(name="REF_CONTR_SERIES", length=4)
	private String refContrSeries;

	@Column(name="REF_CONTR_TYPE", length=2)
	private String refContrType;

	@Column(name="REF_PAYMENT", length=1)
	private String refPayment;

	@Column(name="REF_PAYMENT_NO", precision=22)
	private BigDecimal refPaymentNo;

	@Column(name="REF_PAYMENT_SERIES", length=4)
	private String refPaymentSeries;

	@Column(name="REF_PAYMENT_TYPE", length=2)
	private String refPaymentType;

	@Column(name="REF_TYPE", length=1)
	private String refType;

	@Column(name="REQUESTED_BY", length=50)
	private String requestedBy;

	@Column(name="RETENTION_PERSON", length=30)
	private String retentionPerson;

	@Column(name="SB_ACCOUNT_CODE", length=30)
	private String sbAccountCode;

	@Column(name="SB_DEPOSIT_ACCOUNT", length=30)
	private String sbDepositAccount;

	@Column(name="SBB_CODE", length=30)
	private String sbbCode;

	@Column(name="SBK_CODE", length=30)
	private String sbkCode;

	@Column(name="SUPPLIER_CODE", length=30)
	private String supplierCode;

	@Column(name="SUPPLIER_NAME", length=300)
	private String supplierName;

	@Column(name="SUPPLIER_NAME_THAI", length=300)
	private String supplierNameThai;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TAX_RATE", precision=5)
	private BigDecimal taxRate;

	@Column(name="TAX_TYPE", length=2)
	private String taxType;

	@Column(name="TOT_AP_DEDUCT", precision=22)
	private BigDecimal totApDeduct;

	@Column(name="TOT_VAT", precision=16, scale=2)
	private BigDecimal totVat;

	@Column(name="TOT_WHT", precision=16, scale=2)
	private BigDecimal totWht;

	@Column(name="TRANSACTION_CODE", length=2)
	private String transactionCode;

	@Column(name="TYPE_OF_PAYMENT", length=2)
	private String typeOfPayment;

	@Column(name="UNIT_NUMBER", length=30)
	private String unitNumber;

	@Column(name="USER_STATUS", length=1)
	private String userStatus;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="VOUCHER_DATE")
	private Date voucherDate;
    
    @Column(name="IS_INTERFACE")
	private String isInterface;

	public String getIsInterface() {
		return isInterface;
	}

	public void setIsInterface(String isInterface) {
		this.isInterface = isInterface;
	}

    public PaymentVoucher() {
    }

	public PaymentVoucherPK getId() {
		return this.id;
	}

	public void setId(PaymentVoucherPK id) {
		this.id = id;
	}
	
	public BigDecimal getAdvanceAdjustedAmountFc() {
		return this.advanceAdjustedAmountFc;
	}

	public void setAdvanceAdjustedAmountFc(BigDecimal advanceAdjustedAmountFc) {
		this.advanceAdjustedAmountFc = advanceAdjustedAmountFc;
	}

	public BigDecimal getAdvanceAdjustedAmountLocal() {
		return this.advanceAdjustedAmountLocal;
	}

	public void setAdvanceAdjustedAmountLocal(BigDecimal advanceAdjustedAmountLocal) {
		this.advanceAdjustedAmountLocal = advanceAdjustedAmountLocal;
	}

	public BigDecimal getAdvanceAdjustedVat() {
		return this.advanceAdjustedVat;
	}

	public void setAdvanceAdjustedVat(BigDecimal advanceAdjustedVat) {
		this.advanceAdjustedVat = advanceAdjustedVat;
	}

	public BigDecimal getAdvanceAdjustment() {
		return this.advanceAdjustment;
	}

	public void setAdvanceAdjustment(BigDecimal advanceAdjustment) {
		this.advanceAdjustment = advanceAdjustment;
	}

	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getAmountAdjusted() {
		return this.amountAdjusted;
	}

	public void setAmountAdjusted(BigDecimal amountAdjusted) {
		this.amountAdjusted = amountAdjusted;
	}

	public BigDecimal getAmountAdjustedLocal() {
		return this.amountAdjustedLocal;
	}

	public void setAmountAdjustedLocal(BigDecimal amountAdjustedLocal) {
		this.amountAdjustedLocal = amountAdjustedLocal;
	}

	public BigDecimal getAmountLocal() {
		return this.amountLocal;
	}

	public void setAmountLocal(BigDecimal amountLocal) {
		this.amountLocal = amountLocal;
	}

	public String getApprovalStatus() {
		return this.approvalStatus;
	}

	public void setApprovalStatus(String approvalStatus) {
		this.approvalStatus = approvalStatus;
	}

	public String getApprovedBy() {
		return this.approvedBy;
	}

	public void setApprovedBy(String approvedBy) {
		this.approvedBy = approvedBy;
	}

	public Date getApprovedOnDate() {
		return this.approvedOnDate;
	}

	public void setApprovedOnDate(Date approvedOnDate) {
		this.approvedOnDate = approvedOnDate;
	}

	public String getBatchId() {
		return this.batchId;
	}

	public void setBatchId(String batchId) {
		this.batchId = batchId;
	}

	public String getBobCode() {
		return this.bobCode;
	}

	public void setBobCode(String bobCode) {
		this.bobCode = bobCode;
	}

	public String getBotCode() {
		return this.botCode;
	}

	public void setBotCode(String botCode) {
		this.botCode = botCode;
	}

	public BigDecimal getChequeAmount() {
		return this.chequeAmount;
	}

	public void setChequeAmount(BigDecimal chequeAmount) {
		this.chequeAmount = chequeAmount;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public String getDocumentRef() {
		return this.documentRef;
	}

	public void setDocumentRef(String documentRef) {
		this.documentRef = documentRef;
	}

	public Date getDocumentRefDate() {
		return this.documentRefDate;
	}

	public void setDocumentRefDate(Date documentRefDate) {
		this.documentRefDate = documentRefDate;
	}

	public BigDecimal getDownAdjusted() {
		return this.downAdjusted;
	}

	public void setDownAdjusted(BigDecimal downAdjusted) {
		this.downAdjusted = downAdjusted;
	}

	public BigDecimal getDownAdjustedLocal() {
		return this.downAdjustedLocal;
	}

	public void setDownAdjustedLocal(BigDecimal downAdjustedLocal) {
		this.downAdjustedLocal = downAdjustedLocal;
	}

	public String getEmployeeCode() {
		return this.employeeCode;
	}

	public void setEmployeeCode(String employeeCode) {
		this.employeeCode = employeeCode;
	}

	public BigDecimal getExchGainLoss() {
		return this.exchGainLoss;
	}

	public void setExchGainLoss(BigDecimal exchGainLoss) {
		this.exchGainLoss = exchGainLoss;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public BigDecimal getFiscalPeriod() {
		return this.fiscalPeriod;
	}

	public void setFiscalPeriod(BigDecimal fiscalPeriod) {
		this.fiscalPeriod = fiscalPeriod;
	}

	public BigDecimal getFiscalYear() {
		return this.fiscalYear;
	}

	public void setFiscalYear(BigDecimal fiscalYear) {
		this.fiscalYear = fiscalYear;
	}

	public BigDecimal getGdAmountDeducted() {
		return this.gdAmountDeducted;
	}

	public void setGdAmountDeducted(BigDecimal gdAmountDeducted) {
		this.gdAmountDeducted = gdAmountDeducted;
	}

	public BigDecimal getGdAmountDeductedLc() {
		return this.gdAmountDeductedLc;
	}

	public void setGdAmountDeductedLc(BigDecimal gdAmountDeductedLc) {
		this.gdAmountDeductedLc = gdAmountDeductedLc;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getLinkFileId() {
		return this.linkFileId;
	}

	public void setLinkFileId(BigDecimal linkFileId) {
		this.linkFileId = linkFileId;
	}

	public String getModeOfPayment() {
		return this.modeOfPayment;
	}

	public void setModeOfPayment(String modeOfPayment) {
		this.modeOfPayment = modeOfPayment;
	}

	public String getNarration() {
		return this.narration;
	}

	public void setNarration(String narration) {
		this.narration = narration;
	}

	public BigDecimal getOtherDeductAmountInst() {
		return this.otherDeductAmountInst;
	}

	public void setOtherDeductAmountInst(BigDecimal otherDeductAmountInst) {
		this.otherDeductAmountInst = otherDeductAmountInst;
	}

	public BigDecimal getOtherDeductedAmount() {
		return this.otherDeductedAmount;
	}

	public void setOtherDeductedAmount(BigDecimal otherDeductedAmount) {
		this.otherDeductedAmount = otherDeductedAmount;
	}

	public BigDecimal getPenaltyAmount() {
		return this.penaltyAmount;
	}

	public void setPenaltyAmount(BigDecimal penaltyAmount) {
		this.penaltyAmount = penaltyAmount;
	}

	public BigDecimal getPenaltyAmountLc() {
		return this.penaltyAmountLc;
	}

	public void setPenaltyAmountLc(BigDecimal penaltyAmountLc) {
		this.penaltyAmountLc = penaltyAmountLc;
	}

	public BigDecimal getPoNo() {
		return this.poNo;
	}

	public void setPoNo(BigDecimal poNo) {
		this.poNo = poNo;
	}

	public String getPoSeries() {
		return this.poSeries;
	}

	public void setPoSeries(String poSeries) {
		this.poSeries = poSeries;
	}

	public String getPoType() {
		return this.poType;
	}

	public void setPoType(String poType) {
		this.poType = poType;
	}

	public String getPostingStatus() {
		return this.postingStatus;
	}

	public void setPostingStatus(String postingStatus) {
		this.postingStatus = postingStatus;
	}

	public String getPreparedBy() {
		return this.preparedBy;
	}

	public void setPreparedBy(String preparedBy) {
		this.preparedBy = preparedBy;
	}

	public String getProject() {
		return this.project;
	}

	public void setProject(String project) {
		this.project = project;
	}

	public String getPropertyTypeCode() {
		return this.propertyTypeCode;
	}

	public void setPropertyTypeCode(String propertyTypeCode) {
		this.propertyTypeCode = propertyTypeCode;
	}

	public String getRefAp() {
		return this.refAp;
	}

	public void setRefAp(String refAp) {
		this.refAp = refAp;
	}

	public BigDecimal getRefContrNo() {
		return this.refContrNo;
	}

	public void setRefContrNo(BigDecimal refContrNo) {
		this.refContrNo = refContrNo;
	}

	public BigDecimal getRefContrRevision() {
		return this.refContrRevision;
	}

	public void setRefContrRevision(BigDecimal refContrRevision) {
		this.refContrRevision = refContrRevision;
	}

	public String getRefContrSeries() {
		return this.refContrSeries;
	}

	public void setRefContrSeries(String refContrSeries) {
		this.refContrSeries = refContrSeries;
	}

	public String getRefContrType() {
		return this.refContrType;
	}

	public void setRefContrType(String refContrType) {
		this.refContrType = refContrType;
	}

	public String getRefPayment() {
		return this.refPayment;
	}

	public void setRefPayment(String refPayment) {
		this.refPayment = refPayment;
	}

	public BigDecimal getRefPaymentNo() {
		return this.refPaymentNo;
	}

	public void setRefPaymentNo(BigDecimal refPaymentNo) {
		this.refPaymentNo = refPaymentNo;
	}

	public String getRefPaymentSeries() {
		return this.refPaymentSeries;
	}

	public void setRefPaymentSeries(String refPaymentSeries) {
		this.refPaymentSeries = refPaymentSeries;
	}

	public String getRefPaymentType() {
		return this.refPaymentType;
	}

	public void setRefPaymentType(String refPaymentType) {
		this.refPaymentType = refPaymentType;
	}

	public String getRefType() {
		return this.refType;
	}

	public void setRefType(String refType) {
		this.refType = refType;
	}

	public String getRequestedBy() {
		return this.requestedBy;
	}

	public void setRequestedBy(String requestedBy) {
		this.requestedBy = requestedBy;
	}

	public String getRetentionPerson() {
		return this.retentionPerson;
	}

	public void setRetentionPerson(String retentionPerson) {
		this.retentionPerson = retentionPerson;
	}

	public String getSbAccountCode() {
		return this.sbAccountCode;
	}

	public void setSbAccountCode(String sbAccountCode) {
		this.sbAccountCode = sbAccountCode;
	}

	public String getSbDepositAccount() {
		return this.sbDepositAccount;
	}

	public void setSbDepositAccount(String sbDepositAccount) {
		this.sbDepositAccount = sbDepositAccount;
	}

	public String getSbbCode() {
		return this.sbbCode;
	}

	public void setSbbCode(String sbbCode) {
		this.sbbCode = sbbCode;
	}

	public String getSbkCode() {
		return this.sbkCode;
	}

	public void setSbkCode(String sbkCode) {
		this.sbkCode = sbkCode;
	}

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public String getSupplierName() {
		return this.supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	public String getSupplierNameThai() {
		return this.supplierNameThai;
	}

	public void setSupplierNameThai(String supplierNameThai) {
		this.supplierNameThai = supplierNameThai;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public BigDecimal getTaxRate() {
		return this.taxRate;
	}

	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public String getTaxType() {
		return this.taxType;
	}

	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	public BigDecimal getTotApDeduct() {
		return this.totApDeduct;
	}

	public void setTotApDeduct(BigDecimal totApDeduct) {
		this.totApDeduct = totApDeduct;
	}

	public BigDecimal getTotVat() {
		return this.totVat;
	}

	public void setTotVat(BigDecimal totVat) {
		this.totVat = totVat;
	}

	public BigDecimal getTotWht() {
		return this.totWht;
	}

	public void setTotWht(BigDecimal totWht) {
		this.totWht = totWht;
	}

	public String getTransactionCode() {
		return this.transactionCode;
	}

	public void setTransactionCode(String transactionCode) {
		this.transactionCode = transactionCode;
	}

	public String getTypeOfPayment() {
		return this.typeOfPayment;
	}

	public void setTypeOfPayment(String typeOfPayment) {
		this.typeOfPayment = typeOfPayment;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getUserStatus() {
		return this.userStatus;
	}

	public void setUserStatus(String userStatus) {
		this.userStatus = userStatus;
	}

	public Date getVoucherDate() {
		return this.voucherDate;
	}

	public void setVoucherDate(Date voucherDate) {
		this.voucherDate = voucherDate;
	}

}